package com.hkw.domain;

import java.util.Objects;

/**
 * 评论实体
 */
public class Comment {
    //成员变量对应表中字段
    private Integer id;
    private String content;
    private String author;
    private Integer a_id;

    public Comment() {
    }

    public Comment(Integer id, String content, String author, Integer a_id) {
        this.id = id;
        this.content = content;
        this.author = author;
        this.a_id = a_id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public Integer getA_id() {
        return a_id;
    }
    public void setA_id(Integer a_id) {
        this.a_id = a_id;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Comment comment = (Comment) o;
        return Objects.equals(id, comment.id) &&
                Objects.equals(content, comment.content) &&
                Objects.equals(author, comment.author) &&
                Objects.equals(a_id, comment.a_id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, content, author, a_id);
    }

    @Override
    public String toString() {
        return "Comment{" +
                "id=" + id +
                ", content='" + content + '\'' +
                ", author='" + author + '\'' +
                ", a_id=" + a_id +
                '}';
    }
}
